﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Test3D_ohne_pad
{
    class Camera
    {
        public Matrix orientation { get; private set; }
        public Vector3 pos { get; private set; }
        public Vector3 lookat { get; private set; }

        public Camera(Vector3 pos, Vector3 lookat, Vector3 up)
        {
            orientation = Matrix.Identity;
            orientation *= Matrix.CreateLookAt(pos, lookat, up);
            this.pos = pos;
            this.lookat = lookat;
        }

        public void update(Vector3 pos, Vector3 lookat, Vector3 up)
        {
            orientation = Matrix.Lerp(orientation, Matrix.CreateLookAt(pos, lookat, up), 0.1f);
            this.pos = pos;
            this.lookat = lookat;
        }
    }
}
